package cn.edu.scau.cmi.zhangjunming.hibernate.domain;

import java.io.Serializable;
import java.util.LinkedHashSet;
import java.util.Set;

public class Student implements Serializable{

	
	private static final long serialVersionUID = 1L;
	private Integer id;
    private String name;
	
	private Teacher tutor;
	
	//Set<Teacher> teachers;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Teacher getTutor() {
		return tutor;
	}

	public void setTutor(Teacher tutor) {
		this.tutor = tutor;
	}

	
	
	
	
	public String toString() {
		StringBuilder  buffer = new StringBuilder();
		buffer.append("id:["+id+"] name:["+name+"]\n");
		return new String(buffer);
	}
	
	public void copy(Student stu) {
		setId(stu.getId());
		setName(stu.getName());
		setTutor(stu.getTutor());
		//setTeacher(stu.getTeachers());
	}

}
